<script setup>

const signInNow = () => {
  window.location.href = '/auth/login';
}
</script>

<template>
  <el-form>
    <div class="form_header">
      <p>注册用户</p>
    </div>
    <div class="form_body">
      <div class="form_item">
        <el-input placeholder="请输入手机号" size="large">
          <template #prepend>+86</template>
        </el-input>
      </div>
      <div class="form_item">
        <el-input placeholder="请输入短信验证码" size="large">
          <template #append>获取短信验证码</template>
        </el-input>
      </div>
      <div class="form_item">
        <el-input type="password" show-password placeholder="请输入密码" size="large"></el-input>
      </div>
      <el-checkbox-group>
        <el-checkbox value="" name="type">
          <span>我已同意</span>
          <a href="#"><span>《###使用协议》</span></a>
          <span>和</span>
          <a href="#"><span>《用户隐私协议》</span></a>
        </el-checkbox>
      </el-checkbox-group>
      <div class="form_item login_btn_box">
        <el-button size="large">注册</el-button>
      </div>
      <div class="form_item have_account">
        <span>已有账号？</span>
        <span @click="signInNow">立即登录</span>
      </div>
    </div>
  </el-form>
</template>

<style scoped lang="scss">
.el-form {
  padding: 10px;

  .form_header {
    font-size: 20px;
    font-weight: bold;
  }

  .form_body {
    .form_item {
      width: 100%;
      margin-top: 20px;

      .el-input {
        width: 100%;
      }
    }

    .have_account {
      text-align: center;
      font-size: 14px;

      span:nth-child(2) {
        cursor: pointer;
        margin-left: 5px;
        font-weight: bold;
        color: var(--cx-color1);
      }
    }

    .el-checkbox-group {
      margin-top: 10px;
      margin-bottom: -10px;

      a {
        text-decoration: none;

        span {
          font-weight: bold;
          color: var(--cx-color1);
        }
      }

      span {
        font-size: 12px;
        color: #a5a5a5;
      }
    }

    .login_btn_box {
      width: 100%;

      .el-button {
        width: 100%;
        color: white;
        background-color: var(--cx-color1);
      }
    }
  }
}
</style>